#设置cmake最低版本
cmake_minimum_required(VERSION 3.4.1)

#设置项目名称
project(tst_qtdeclarative_benchmarks)

#引入add_module模板文件
include(${ISSQTTESTROOTDIR}/cmake/add_module.cmake)

#设置测试类型，auto为自动测试，manual为手动测试,即test目录下的文件夹名
set(TEST_TYPE benchmarks)
#设置模块名
set(MODULE qtdeclarative)
#设置需要链接的模块
set(LinkQt Core Qml Quick Concurrent Gui Network QuickWidgets Sql Widgets OpenGL QmlWorkerScript)
#设置需要链接的模块的私有模块
set(LinkQtPrivate  Core Gui Network Qml Quick QuickWidgets Widgets)

add_definitions(-DQT_QMLTEST_DATADIR=\":/data\")
add_definitions(-DSRCDIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")

#多级目录
set(TEST_ITEMS ${TEST_ITEMS}
    qml/compilation
    qml/qqmlcomponent
    qml/qqmlmetaproperty
    qml/librarymetrics_performance
    qml/script
    qml/js
    qml/creation
    qml/qquickwindow
    quick
	../auto/quick/shared
    ../auto/shared
    qml/qqmlchangeset
    qml/binding
    qml/holistic
    qml/javascript
    quick/events
)

#排出不需要的.cpp
set(EXCLUDE_SRC ${EXCLUDE_SRC}
    qml/holistic/tst_holistic.cpp          #SIGSEGV(SEGV_MAPERR)(QScopedPointer<QObjectData, QScopedPointerDeleter<QObjectData>>::operator->() cons)
)
set(PLUGINS QOpenHarmonyPlatformIntegrationPlugin)
#再把TEST_ITEMS传给create_library整合测试项，生成测试库
#整合测试项，生成测试库，名字当前工程名，即project(tst_qtcharts_auto)中定义的tst_qtcharts_auto
create_library(${TEST_ITEMS})

